<template>
  <div v-if="data.length > 0" class="super-banner">
    <div
      v-for="(item, index) in data"
      :key="index"
      class="super-banner-item"
      @click="handleItemClick(item)"
    >
      <img :src="item.imgUrl" />
    </div>
  </div>
</template>

<script>
export default {
  name: 'super-banner',
  props: {
    moduleType: {
      type: Number,
      default: 1
    },
    data: {
      type: Array,
      default: () => []
    }
  },
  methods: {
    handleItemClick(...params) {
      this.$emit('click', ...params);
    }
  }
};
</script>

<style lang="scss" scoped>
.super-banner {
  .super-banner-item {
    width: 355px;
    height: 76px;
    margin-bottom: 10px;
    img {
      width: 100%;
      height: 100%;
      display: block;
    }
  }
}
</style>
